package com.mdd.front.vo.comment;

import com.alipay.api.internal.mapping.ApiField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "刷评论对象", description = "刷评论对象")
public class CommentParam {
    @ApiModelProperty("商品ID")
    private Integer goodId;
    @ApiModelProperty("评论")
    private List<String> comment;
    @ApiModelProperty("图片")
    private List<String> url;
    @DateTimeFormat(pattern = "yy-MM-dd")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("评论开始时间")
    private Date startTime;
    @ApiModelProperty("当前时间")
    private Long enTime = new Date().toInstant().getEpochSecond();
    @ApiModelProperty("服务分")
    private Integer service = 5;

    @ApiModelProperty("差评")
    private Integer not = 0;

    public Long getstartTime() {
        return startTime != null ? startTime.getTime()/1000 : null;
    }
}
